package difficult;

public class Solution_887 {
    public int superEggDrop(int k, int n) {
        if (k==1 || n == 1) {
            return n;
        }
        int num = (n + 1) >> 1;
        return Math.min(superEggDrop(num - 1, k - 1), superEggDrop(num, k)) + 1;
    }

    public static void main(String[] args) {
        Solution_887 model = new Solution_887();
//        System.out.println(model.superEggDrop(1, 2));
        System.out.println(model.superEggDrop(2, 6));
    }
}
